import { defineStore } from "pinia";
import { ref } from "vue";
// import $http from '@/api/index.js';

export const useUserStore = defineStore('user', () => {
  let accessToken = ref('');
  let refreshToken = ref('');
  let userInfo = ref();
  let permissions = ref([]);
  return {
    accessToken,
    refreshToken,
    userInfo,
    permissions,
  }
},{
  // 开启持久化存储
  persist: {
    persist: true,
    // 明确排除敏感字段 
    // omit: [
    // ]
  }
})